﻿package mortal.game.scene3D.display3d.text3d.staticText3d
{
    import __AS3__.vec.*;
    import mortal.game.scene3D.display3d.text3d.*;

    public class SText3D extends Object
    {
        private var _targetVector:Vector.<Number>;
        private var _ix2:int;
        private var _iy2:int;
        private var _iz2:int;
        private var _iw2:int;
        private var place:Stext3DPlace;
        private var _parentPlace:Stext3DPlace;
        private var textValue:String;
        private var _offsetX:int;
        private var _width:uint = 0;
        private var _height:uint = 0;
        private var _uvOffsetX:Number = 0;
        private var _uvOffsetY:Number = 0;

        public function SText3D(param1:String)
        {
            this.textValue = param1;
            return;
        }// end function

        public function setCenterPos(param1:int) : void
        {
            this._offsetX = this._offsetX + param1;
            this._targetVector[this._iz2] = this._offsetX;
            return;
        }// end function

        public function reInitPlace(param1:Stext3DPlace, param2:Stext3DPlace) : void
        {
            this.place = param1;
            this._parentPlace = param2;
            this._targetVector = this.place.targetVector.list;
            this._ix2 = this.place.placeId * 4;
            this._iy2 = this._ix2 + 1;
            this._iz2 = this._ix2 + 2;
            this._iw2 = this._ix2 + 3;
            this._targetVector[this._ix2] = this._uvOffsetY + this._width;
            this._targetVector[this._iy2] = this._uvOffsetX + this._height;
            this._targetVector[this._iz2] = this._offsetX;
            this._targetVector[this._iw2] = this._parentPlace.placeId;
            return;
        }// end function

        public function clear() : void
        {
            if (this.place)
            {
                this.place.targetVector.clearSplace(this.place);
                this._targetVector[this._iw2] = 1000;
            }
            return;
        }// end function

        public function setImgInfo(param1:uint, param2:uint, param3:int, param4:Number, param5:Number) : void
        {
            this._width = param1;
            this._height = param2;
            this._uvOffsetX = param4;
            this._uvOffsetY = param5;
            this._offsetX = param3;
            this._targetVector[this._ix2] = this._uvOffsetY + this._width;
            this._targetVector[this._iy2] = this._uvOffsetX + this._height;
            this._targetVector[this._iz2] = this._offsetX;
            this._targetVector[this._iw2] = this._parentPlace.placeId;
            return;
        }// end function

    }
}
